package edu.iscas.appcheckclient.model.actions;


public class Press extends Action {
    public static final String jsonName = "press";
    protected Press.Type type;
    public enum Type{
        back
    }
    public Press(Press.Type type){
        this.name = "press";
        this.type = type;
        this.statement = brewStatement(true);
    }

    @Override
    public void setStatement(String statement) {
        this.statement = statement;
    }

    @Override
    public String brewStatement(boolean paramBoolean) {
        switch (type){
            case back:
                String str = "Espresso.pressBack()";
                return str;
            default:
                return null;
        }
    }
    public boolean equals(Object object){
        if(!(object instanceof Press)){
            return false;
        }
        if(!this.name.equals(((Press) object).name) || (!this.type.equals(((Press) object).type))){
            return false;
        }
        return true;
    }

    public Press.Type getType(){
        return this.type;
    }
    @Override
    public String getTypeString() {
        return "press" + getType().toString();
    }

    @Override
    public String getValue() {
        return "";
    }
}
